package com.wooophone.file.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.wooophone.file.dao.FileEntityDao;
import com.wooophone.file.entity.FileEntity;
import com.wooophone.file.mapper.FileEntityMapper;

public class FileEntityDaoImpl implements FileEntityDao {

	@Autowired
	private FileEntityMapper fileEntityMapper;

	public void setFileEntityMapper(FileEntityMapper fileEntityMapper) {
		this.fileEntityMapper = fileEntityMapper;
	}

	@Override
	public FileEntity save(FileEntity obj) {
		int r = fileEntityMapper.save(obj);
		if(r<1){
			obj.setId(null);
		}
		return obj;
	}

	@Override
	public int update(FileEntity obj) {
		return 0;
	}

	@Override
	public int delete(String id) {
		return fileEntityMapper.delete(id);
	}

	@Override
	public FileEntity get(String id) {
		return fileEntityMapper.get(id);
	}

	@Override
	public List<FileEntity> list() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<FileEntity> list(int offset, int limit) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int count() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<FileEntity> find(Map<String, Object> parameter) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<FileEntity> find(Map<String, Object> parameter, int offset,
			int limit) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int count(Map<String, Object> parameter) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int count(String keyword) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<FileEntity> search(String keyword, int offset, int limit) {
		// TODO Auto-generated method stub
		return null;
	}

}
